#ifndef __PVMOSDEP_H__
#define __PVMOSDEP_H__

#include "pvm/pvmdefs.h"
#include "pvm/pvmtypes.h"

#include <pthread.h>
#include <memory.h>
#include <stdio.h>
#include <stdarg.h>


typedef pthread_mutex_t	PVMCriticalSection;

typedef struct _PVMThreadHandle
{
	pthread_t thread;
	pvm_bool isValid;
	pthread_mutex_t m_suspendMutex;
	pthread_cond_t m_suspendCond;
} PVMThreadHandle;

typedef struct _EventHandle {
    pthread_mutex_t mutex;
    pthread_cond_t cond;
    bool triggered;
} PVMEventHandle;

typedef void* PVMThreadRetVal;
typedef PVMThreadRetVal (PVMCALL *PVMThreadStartRoutine)(void* param);
typedef FILE* PVMFileHandle;


#define PVM_FILE_OPEN_ERROR		NULL 
#define PVM_EMPTY_FILE_HANDLE	NULL

#endif
